package com.xzit.day07.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.xzit.day07.enums.UserStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user")
public class User extends Model<User> {
    @TableId(type = IdType.ASSIGN_ID) // 使用雪花算法
    private Long id;
    
    private String name;

    private String password;
    
    private UserStatus status; // 使用枚举
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    

}

